import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNotEmpty, IsObject } from 'class-validator';

export class CreateDeviceDto {
  @ApiProperty({ description: '设备名称', example: 'iPhone 12' })
  @IsString()
  @IsNotEmpty()
  deviceName: string;

  @ApiProperty({ description: '设备ID', example: 'DEVICE123' })
  @IsString()
  @IsNotEmpty()
  deviceId: string;

  @ApiProperty({ description: '设备类型', example: 'mobile' })
  @IsString()
  @IsNotEmpty()
  deviceType: string;

  @ApiProperty({ description: '设备信息', example: { os: 'iOS', version: '14.0' } })
  @IsObject()
  deviceInfo: Record<string, any>;
}

export class UpdateDeviceDto extends CreateDeviceDto {} 